package cn.mysdp.biz.controller;


import cn.mysdp.biz.dto.request.*;
import cn.mysdp.biz.dto.response.*;
import cn.mysdp.biz.facade.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: SdpWorkspaceWebBaseController
 * @Description:
 * @Author: SDP
 * @Date: 2021-10-30
 * @Version: 1.0
 * Table: sdp_workspace
 * Comment:
 * workspace
 */
public class SdpWorkspaceWebBaseController extends BaseController {
    @Autowired
    SdpWorkspaceFacade service;

    public Integer addSdpWorkspace(SdpWorkspaceAddRequest request) throws Exception {
        return service.addSdpWorkspace(request);
    }

    public Integer updateSdpWorkspace(SdpWorkspaceUpdateRequest request) throws Exception {
        return service.updateSdpWorkspace(request);
    }

    public Integer deleteSdpWorkspace(SdpWorkspaceDeleteRequest request) throws Exception {
        return service.deleteSdpWorkspace(request);
    }

    public SdpWorkspaceQueryResponse querySdpWorkspace(SdpWorkspaceQueryRequest request) throws Exception {
        return service.querySdpWorkspace(request);
    }

    public List<SdpWorkspaceQueryResponse> listSdpWorkspace(SdpWorkspaceQueryRequest request) throws Exception {
        return service.listSdpWorkspace(request);
    }

    public Integer countSdpWorkspace(SdpWorkspaceQueryRequest request) throws Exception {
        return service.countSdpWorkspace(request);
    }

    public BaseStatResponse statSdpWorkspace(SdpWorkspaceQueryRequest request) throws Exception {
        return service.statSdpWorkspace(request);
    }

    public List<SdpWorkspaceForGetColumnListResponse> getColumnList(SdpWorkspaceForGetColumnListRequest request) throws Exception {
        return service.getColumnList(request);
    }

    public Integer countForGetColumnList(SdpWorkspaceForGetColumnListRequest request) throws Exception {
        return service.countForGetColumnList(request);
    }

    public BaseStatResponse statForGetColumnList(SdpWorkspaceForGetColumnListRequest request) throws Exception {
        return service.statForGetColumnList(request);
    }

    public String exportExcelGetColumnList(SdpWorkspaceForGetColumnListRequest request) throws Exception {
        clearPageInfo(request);
        
        List<SdpWorkspaceForGetColumnListResponse> list = service.getColumnList(request);
        return super.exportExcel(request, list);
    }
    
    public List<SdpWorkspaceForGetTableListResponse> getTableList(SdpWorkspaceForGetTableListRequest request) throws Exception {
        return service.getTableList(request);
    }

    public Integer countForGetTableList(SdpWorkspaceForGetTableListRequest request) throws Exception {
        return service.countForGetTableList(request);
    }

    public BaseStatResponse statForGetTableList(SdpWorkspaceForGetTableListRequest request) throws Exception {
        return service.statForGetTableList(request);
    }

    public String exportExcelGetTableList(SdpWorkspaceForGetTableListRequest request) throws Exception {
        clearPageInfo(request);
        
        List<SdpWorkspaceForGetTableListResponse> list = service.getTableList(request);
        return super.exportExcel(request, list);
    }
    
    public List<SdpWorkspaceForGetDbConfigResponse> getDbConfig(SdpWorkspaceForGetDbConfigRequest request) throws Exception {
        return service.getDbConfig(request);
    }

    public Integer countForGetDbConfig(SdpWorkspaceForGetDbConfigRequest request) throws Exception {
        return service.countForGetDbConfig(request);
    }

    public BaseStatResponse statForGetDbConfig(SdpWorkspaceForGetDbConfigRequest request) throws Exception {
        return service.statForGetDbConfig(request);
    }

    public String exportExcelGetDbConfig(SdpWorkspaceForGetDbConfigRequest request) throws Exception {
        clearPageInfo(request);
        
        List<SdpWorkspaceForGetDbConfigResponse> list = service.getDbConfig(request);
        return super.exportExcel(request, list);
    }
    

    public Integer clone(BaseNameIdRequest request) throws Exception {
        return service.clone(request);
    }

    public Integer cloneWorkspace(BaseNameIdRequest request) throws Exception {
        return service.cloneWorkspace(request);
    }

    public String fixJsonObject(BaseNameRequest request) throws Exception {
        return service.fixJsonObject(request);
    }

    public String testConnect(SdpWorkspaceUpdateRequest request) throws Exception {
        return service.testConnect(request);
    }

}
